
package com.eastmountain.chinese.db.exceptions;

public class DBAccessException extends Exception {
    
    private String message = "";
    private Object rowFields = new Object();
    private String tableName = "";
    private Throwable cause  = new Throwable(); 

    public DBAccessException( String message, Object rowFields,
                              String tableName, Throwable cause ) {

        super( message, cause );
        
        this.message   = message;
        this.rowFields = rowFields;
        this.tableName = tableName;
        this.cause     = cause; 

    }

    public DBAccessException( String message, Object rowFields,
                              String tableName ) {
        
        this( message, rowFields, tableName, new Throwable() );

    }
    
    public DBAccessException(String message, Throwable cause ) {       
        
        this( message, new Object(), "", new Throwable() );

    }

    
    public DBAccessException(String message) {
        
        this( message, new Object(), "" );

    }

    public String getMessage() {
    
        return message;
    }

    public void setMessage( String message ) {
    
        this.message = message;
    }

    public Object getRowFields() {
    
        return rowFields;
    }

    public void setRowFields( Object rowFields ) {
    
        this.rowFields = rowFields;
    }

    public String getTableName() {
    
        return tableName;
    }

    public void setTableName( String tableName ) {
    
        this.tableName = tableName;
    }

    public Throwable getCause() {
    
        return cause;
    }

    public void setCause( Throwable cause ) {
    
        this.cause = cause;
    }

}